﻿using PaCSTools.Tool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dapper;

namespace PaCSClientMain.View
{
    class Test2 : SQLServerHelper
    {
        /// <summary>  
        /// 手写Sql插入数据  
        /// </summary>  
        public int InsertWithSql()
        {
            using (var conn = Connection)
            {
                conn.Open();
                var r = conn.Execute(@"insert into pacs_log(log_type,create_date,create_time,create_ip,create_user) values (@a, @b,@c,@d,@e)",
                new[] {   
                            new { a = 1, b = 1, c = 1, d = "192.168.20.99", e = 1 },  
                            new { a = 2, b = 2, c = 2, d = "192.168.20.99", e = 2 },  
                            new { a = 3, b = 3, c = 3, d = "192.168.20.99", e = 3 }   
                        });
                conn.Close();  
                return r;
            }
        }
        
    }
}
